﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Collections.Specialized;

/// <summary>
/// 工具类
/// </summary>
public  class CommonUtil
{
    /// <summary>
    /// 根据配置类型和键获取配置项的值
    /// </summary>
    /// <param name="type">类型</param>
    /// <param name="key">键</param>
    /// <returns></returns>
    public static String GetConfigValue(string type, string key)
    {
        return ((NameValueCollection)ConfigurationManager.GetSection(type))[key]; 
    }
}

